package com.sfdk.log
{
	public class Logger
	{
		private static var _loggerVector : Vector.<String>;
		
		public function Logger()
		{
			_loggerVector = new Vector.<String>();
		}
		
		public static function debug(value : String) : void
		{
			_loggerVector.push(value);
			trace("Logger.debug :: "+value);
		}
		
		public static function log(value : String) : void
		{
			_loggerVector.push(value);
		}
		
		public static function error(value : String) : void
		{
			_loggerVector.push(value);
			throw new Error(value);
		}
		
		public static function dump() : void
		{
			for each(var log : String in _loggerVector)
			{
				trace(log);
			}
		}
		
		public static function dumpToString() : String
		{
			var outStr : String = _loggerVector.join("\n");
			_loggerVector = new Vector.<String>();
			trace(outStr);
			return outStr;
		}

	}
}